package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author chenyeqing
 * @Date 2022/3/9 19:34
 */
@FeignClient(value = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    /**
     * 删除视频的方法
     * @return
     */
    @DeleteMapping("/eduvod/video/deleteAliyunVideo/{videoId}")
    R deleteAliyunVideo(@PathVariable("videoId") String videoId);

    @DeleteMapping("/eduvod/video/delete-batch")
    R deleteBatchAliyunVideo(@RequestParam List<String> videoList);

}
